#include <stdio.h>
#include "dictionary.h"

int main() {
    // 创建字典
    struct Dictionary *dict = createDictionary();

    // 插入键值对
    insert(dict, "name", "Alice");
    insert(dict, "age", "30");
    insert(dict, "city", "New York");

    // 打印字典内容
    printf("Dictionary contents:\n");
    printDictionary(dict);

    // 查找键值对
    char *value = search(dict, "name");
    if (value) {
        printf("\nFound: name = %s\n", value);
    } else {
        printf("\nNot found: name\n");
    }

    // 删除键值对
    delete(dict, "age");

    // 打印字典内容
    printf("\nDictionary contents after deletion:\n");
    printDictionary(dict);

    // 销毁字典
    destroyDictionary(dict);

    return 0;
}
